package com.lsa.helpers.graph;

public class EdgeNode<U> implements IEdgeNode<U> {
	private int from;
	private int to;
	private U data;
	private IEdgeNode<U> next;
	
	public EdgeNode(int from, int to, U data) {
		this.from = from;
		this.to = to;
		this.data = data;
	}
	
	@Override
	public int from() {
		return from;
	}

	@Override
	public int to() {
		return to;
	}

	@Override
	public U getData() {
		return data;
	}

	@Override
	public IEdgeNode<U> getNext() {
		return next;
	}

	@Override
	public void setNext(IEdgeNode<U> next) {
		this.next = next;
	}

	@Override
	public String toString() {
		return "EdgeNode [from=" + from + ", to=" + to + ", data=" + data + "]";
	}
}
